/*
 * (C) Copyright 2016 Ymatou (http://www.ymatou.com/).
 * 
 * All rights reserved.
 */
package com.ymatou.iapi.trading.operate.parameter.req;

import java.util.List;

import com.ymatou.iapi.trading.operate.parameter.OrderGroupVo;
import com.ymatou.iapi.trading.operate.parameter.YmatouCouponVo;
import com.ymatou.iapi.trading.operate.parameter.enums.AppTerminalSourceEnum;
import com.ymatou.iapi.trading.operate.parameter.enums.OrderSourceEnum;
import com.ymatou.iapi.trading.operate.parameter.enums.TerminalSourceEnum;

/**
 * 
 * @author tuwenjie 2016年5月7日 下午4:13:45
 *
 */
public class PlaceOrderReq extends BaseRequest {
	private static final Long serialVersionUID = -6380630094035523851L;

	// 买家ID
	private int userId;

	// 买家级别
	private int userLevel;

	// 订单来源
	private OrderSourceEnum orderSource;

	// 终端来源
	private TerminalSourceEnum terminalSource;

	// 应用终端来源
	private AppTerminalSourceEnum appTerminalSource;

	// 买家IP
	private String sourceIp;

	// 设备ID
	private String deviceId;

	// 用户设备原始ID,例如IMEI等
	private String equipmentId;

	public String getEquipmentId() {
		return equipmentId;
	}

	public void setEquipmentId(String equipmentId) {
		this.equipmentId = equipmentId;
	}

	// 订单组列表。一般按买手分组
	private List<OrderGroupVo> orderGroups;

	// 使用的平台优惠券
	private YmatouCouponVo ymatouCoupon;

	/**
	 * 业务来源
	 */
	private BizVo bizSource;

	/**
	 * 是否需要交易下单扣库存
	 */
	private Boolean needsReduceStock;

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public int getUserLevel() {
		return userLevel;
	}

	public void setUserLevel(int userLevel) {
		this.userLevel = userLevel;
	}

	public OrderSourceEnum getOrderSource() {
		return orderSource;
	}

	public void setOrderSource(OrderSourceEnum orderSource) {
		this.orderSource = orderSource;
	}

	public TerminalSourceEnum getTerminalSource() {
		return terminalSource;
	}

	public void setTerminalSource(TerminalSourceEnum terminalSource) {
		this.terminalSource = terminalSource;
	}

	public AppTerminalSourceEnum getAppTerminalSource() {
		return appTerminalSource;
	}

	public void setAppTerminalSource(AppTerminalSourceEnum appTerminalSource) {
		this.appTerminalSource = appTerminalSource;
	}

	public String getDeviceId() {
		return deviceId;
	}

	public void setDeviceId(String deviceId) {
		this.deviceId = deviceId;
	}

	public String getSourceIp() {
		return sourceIp;
	}

	public void setSourceIp(String sourceIp) {
		this.sourceIp = sourceIp;
	}

	public List<OrderGroupVo> getOrderGroups() {
		return orderGroups;
	}

	public void setOrderGroups(List<OrderGroupVo> orderGroups) {
		this.orderGroups = orderGroups;
	}

	public YmatouCouponVo getYmatouCoupon() {
		return ymatouCoupon;
	}

	public void setYmatouCoupon(YmatouCouponVo ymatouCoupon) {
		this.ymatouCoupon = ymatouCoupon;
	}

	@Override
	public boolean requireRequestId() {
		return true;
	}

	public BizVo getBizSource() {
		return bizSource;
	}

	public void setBizSource(BizVo bizSource) {
		this.bizSource = bizSource;
	}

	public Boolean getNeedsReduceStock() {
		return needsReduceStock;
	}

	public void setNeedsReduceStock(Boolean needsReduceStock) {
		this.needsReduceStock = needsReduceStock;
	}
}
